function sum(a){
    var count = a;
    return function(b){
        return count += b
    }
}
console.log(sum(5)(-1))